package com.yzx.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yzx.mapper.SysUserMapper;
import com.yzx.domain.SysUser;
import com.yzx.service.SysUserService;

@Service
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public SysUser queryUserByPhone(String phone) {
        QueryWrapper<SysUser> qw = new QueryWrapper();
        qw.eq(SysUser.COL_PHONE,phone);
        SysUser sysUser = sysUserMapper.selectOne(qw);
        return sysUser;
    }

    @Override
    public SysUser queryOneById(Long id) {
        return sysUserMapper.selectById(id);
    }
}

